@page
@using EasyAbp.EShop.Orders.Localization
@using EasyAbp.EShop.Orders.Web.Menus
@using EasyAbp.EShop.Orders.Web.Pages.EShop.Orders.Orders.Order
@using Microsoft.Extensions.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@model IndexModel
@inject IPageLayout PageLayout
@inject IStringLocalizer<OrdersResource> L
@{
    PageLayout.Content.Title = L["Order"].Value;
    PageLayout.Content.BreadCrumb.Add(L["Menu:Order"].Value);
    PageLayout.Content.MenuItemName = OrdersMenus.Order;

    var cardTitle = L["Order"].Value;
    
    if (Model.StoreName != null)
    {
        cardTitle += $" - {Model.StoreName}";
    }
    
    if (Model.CustomerUserName != null)
    {
        cardTitle += $" - {Model.CustomerUserName}";
    }
}

@section scripts
{
    <abp-script src="/Pages/EShop/Orders/Orders/Order/index.js" />
}
@section styles
{
    <abp-style src="/Pages/EShop/Orders/Orders/Order/index.css"/>
}

<script>
    let storeId = '@Model.StoreId';
</script>

<abp-card>
    <abp-card-header>
        <abp-row>
            <abp-column size-md="_6">
                <abp-card-title>@cardTitle</abp-card-title>
            </abp-column>
        </abp-row>
    </abp-card-header>
    <abp-card-body>
        <abp-table striped-rows="true" id="OrderTable" class="nowrap">
            <thead>
            <tr>
                <th>@L["Actions"]</th>
                <th>@L["OrderOrderNumber"]</th>
                <th>@L["OrderCustomerUserId"]</th>
                <th>@L["OrderOrderStatus"]</th>
                <th>@L["OrderCurrency"]</th>
                <th>@L["OrderActualTotalPrice"]</th>
            </tr>
            </thead>
        </abp-table>
    </abp-card-body>
</abp-card>